import * as React from 'react';
import * as PropTypes from 'prop-types';
interface LogicWrapperProps {
  value: boolean;
  children?: React.ReactNode;
}
const LogicWrapper: React.FC<LogicWrapperProps> = (props) => {
  return props.value ? <>{props.children}</> : null;
};
LogicWrapper.defaultProps = {
  value: true,
};
LogicWrapper.propTypes = {
  value: PropTypes.bool.isRequired,
  children: PropTypes.node,
};
export default LogicWrapper;
